home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / tex / mf / inputs / local.mf < prev    next >
Text File  |  1993-11-28  |  6KB  |  161 lines

  1. %
  2. % local.mf
  3. %
  4.  
  5. %
  6. % Define modes
  7. %
  8. mode_def hplaser =     % HP LaserJet+
  9.  proofing:=0;          % no, we're not making proofs
  10.  fontmaking:=1;        % yes, we are making a font
  11.  tracingtitles:=0;     % no, don't show titles in the log
  12.  pixels_per_inch:=300;
  13.  blacker:=0;           % The LaserJet is black enough
  14.  fillin:=.2;           % and it tends to fill in diagonals
  15.  o_correction:=.6;     % 
  16.  enddef;
  17.  
  18. mode_def kyocera =     % Kyocera F-1010
  19.  proofing:=0;          % no, we're not making proofs
  20.  fontmaking:=1;        % yes, we are making a font
  21.  tracingtitles:=0;     % no, don't show titles in the log
  22.  pixels_per_inch:=300;
  23.  blacker:=0;           % The Kyocera is black enough
  24.  fillin:=.2;           % and it tends to fill in diagonals
  25.  o_correction:=.6;     %
  26.  enddef;
  27.  
  28. mode_def epsonfx =     % Epson FX-80
  29.  proofing:=0;          % no, we're not making proofs
  30.  fontmaking:=1;        % yes, we are making a font
  31.  tracingtitles:=0;     % no, don't show titles in the log
  32.  pixels_per_inch:=240;
  33.  blacker:=0;           % don't make the pens any blacker
  34.  fillin:=0;            % and don't compensate for fillin
  35.  o_correction:=.2;     % but suppress most overshoots
  36.  aspect_ratio:=9/10;   % 216 dots/inch vertical
  37.  enddef;
  38.  
  39. mode_def epsonmx =     % Epson MX-80
  40.  proofing:=0;          % no, we're not making proofs
  41.  fontmaking:=1;        % yes, we are making a font
  42.  tracingtitles:=0;     % no, don't show titles in the log
  43.  pixels_per_inch:=120;
  44.  blacker:=0;           % don't make the pens any blacker
  45.  fillin:=0;            % and don't compensate for fillin
  46.  o_correction:=.2;     % but suppress most overshoots
  47.  aspect_ratio:=9/5;    % 216 dots/inch vertical
  48.  enddef;
  49.  
  50. mode_def lqhires =     % NEC-P6 high resolution (360x360)
  51.  proofing:=0;          % no, we're not making proofs
  52.  fontmaking:=1;        % yes, we are making a font
  53.  tracingtitles:=0;     % no, don't show titles in the log
  54.  pixels_per_inch:=360;
  55.  blacker:=0;           % don't make the pens any blacker
  56.  fillin:=0;            % and don't compensate for fillin
  57.  o_correction:=.4;     % but suppress most overshoots
  58.  enddef;
  59.  
  60. mode_def lqmedres =    % LQ-1500, NEC-P6 medium resolution (360x180)
  61.  proofing:=0;          % no, we're not making proofs
  62.  fontmaking:=1;        % yes, we are making a font
  63.  tracingtitles:=0;     % no, don't show titles in the log
  64.  pixels_per_inch:=360;
  65.  blacker:=0;           % 0.3 avoids `holes'
  66.  fillin:=0;            % and don't compensate for fillin
  67.  o_correction:=.1;     % but suppress most overshoots
  68.  aspect_ratio:=1/2;    % 180 dots/inch vertical
  69.  enddef;
  70.  
  71. mode_def lqmedresl =   % LQ-1500, NEC-P6 medium resolution (180x360)
  72.  proofing:=0;          % no, we're not making proofs
  73.  fontmaking:=1;        % yes, we are making a font
  74.  tracingtitles:=0;     % no, don't show titles in the log
  75.  pixels_per_inch:=180;
  76.  blacker:=0;           % 0.3 avoids `holes'
  77.  fillin:=0;            % and don't compensate for fillin
  78.  o_correction:=.1;     % but suppress most overshoots
  79.  aspect_ratio:=2;      % 360 dots/inch vertical
  80.  enddef;
  81.  
  82. mode_def lqlores =     % LQ-1500, NEC-P6 low resolution (180x180)
  83.  proofing:=0;          % no, we're not making proofs
  84.  fontmaking:=1;        % yes, we are making a font
  85.  tracingtitles:=0;     % no, don't show titles in the log
  86.  pixels_per_inch:=180;
  87.  blacker:=0;           % don't make the pens any blacker
  88.  fillin:=0;            % and don't compensate for fillin
  89.  o_correction:=.1;     % but suppress most overshoots
  90.  enddef;
  91.  
  92. mode_def itoh =        % C.ITOH 8510A (160x144)
  93.  proofing:=0;          % no, we're not making proofs
  94.  fontmaking:=1;        % yes, we are making a font
  95.  tracingtitles:=0;     % no, don't show titles in the log
  96.  pixels_per_inch:=160;
  97.  blacker:=0;           % don't make the pens any blacker
  98.  fillin:=0;            % and don't compensate for fillin
  99.  o_correction:=.1;     % but suppress most overshoots
  100.  aspect_ratio:=9/10;   % 144 dots/inch vertical
  101.  enddef;
  102.  
  103. %
  104. % Select default mode
  105. %
  106. localfont:=hplaser;
  107.  
  108.  
  109. %
  110. % Here are macros for Xerox-world font info:
  111. %
  112.  
  113. def font_family expr s =  % string s names the font family, e.g., "CMR"
  114.  headerbyte 49: BCPL_string(s,20);
  115.  special "identifier "&s enddef;
  116. def coding_scheme expr s = % string s names the scheme, e.g. "TEX TEXT"
  117.  headerbyte 9: BCPL_string(s,40);
  118.  special "codingscheme "&s enddef;
  119. def font_face_byte expr x = % integer x gives the family member number,
  120.  headerbyte 72: x;          % which should be between 0 and 255
  121.  special "fontfacebyte"; numspecial x enddef;
  122.  
  123. def BCPL_string(expr s,n)= % string s becomes an n-byte BCPL string
  124.  for l:=if length(s)>=n: n-1 else: length(s) fi: l
  125.   for k:=1 upto l: , substring (k-1,k) of s endfor
  126.   for k:=l+2 upto n: , 0 endfor endfor enddef;
  127.  
  128. Xerox_world:=1;    % users can say `if known Xerox_world:...fi'
  129.  
  130. inner end;
  131. def bye=
  132.  if fontmaking>0: font_family font_identifier_;
  133.   coding_scheme font_coding_scheme_;
  134.   font_face_byte max(0,254-round 2designsize); fi
  135.  tracingstats:=1;  % at least for now we want this
  136.  end
  137.  enddef;
  138.  
  139. outer bye,end;
  140.  
  141.  
  142. %
  143. % Patch plain base (kill bugs)
  144. %
  145. def drawdot expr z = if unknown currentpen_path: def_pen_path_ fi
  146.  addto_currentpicture contour
  147.   currentpen_path shifted (z.t_) withpen penspeck enddef;
  148.  
  149. %
  150. % This has been fixed in plain 1.7
  151. %
  152. %vardef cutoff(expr z,theta) =
  153. % interim autorounding := 0; interim smoothing := 0;
  154. % addto pic_ doublepath z.t_ withpen currentpen;
  155. % addto pic_ contour
  156. %  (cut_ scaled (1+max(pen_lft,pen_rt,pen_top/aspect_ratio,pen_bot/aspect_ratio))
  157. %   rotated theta shifted z.t_);
  158. % cull pic_ keeping (2,2) withweight -default_wt_;
  159. % addto currentpicture also pic_;
  160. % pic_:=nullpicture enddef;
  161.